﻿namespace ClassLibrary.BusinessLayer.Facade
{
    using ClassLibrary.BusinessLayer.BusinessObjects;
    using ClassLibrary.DataLayer.DataObjects;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.Common;

    [DataObject(true)]
    public class ProjectClassFacade
    {
        private IProjectClassDAO projectClassDAO = DAOAccess.ProjectClassDAO;

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public bool AddProjectClass(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.InsertProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public int AddProjectClassAndReturnIdentity(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.InsertProjectClassReturnIdentity(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public string AddProjectClassAndReturnOutput(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.InsertProjectClassReturnOutput(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Delete)]
        public bool DeleteProjectClass(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.DeleteProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProjectClass> GetProjectClass(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.GetProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProjectClass> GetProjectClass(string projectClass)
        {
            ProjectClass clsProjectClass = new ProjectClass();
            clsProjectClass._ProjectClass = projectClass;
            return this.projectClassDAO.GetProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProjectClass> GetsProjectClass()
        {
            return this.projectClassDAO.GetsProjectClass();
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public DataTable GetsProjectClass(string SPName, DbParameter[] param)
        {
            return this.projectClassDAO.GetsProjectClass(SPName, param);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProjectClass> ListProjectClass(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.ListProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProjectClass> ListProjectClass(string projectClass)
        {
            ProjectClass clsProjectClass = new ProjectClass();
            clsProjectClass._ProjectClass = projectClass;
            return this.projectClassDAO.ListProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public bool UpdateProjectClass(ProjectClass clsProjectClass)
        {
            return this.projectClassDAO.UpdateProjectClass(clsProjectClass);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public int UpdateProjectClass(string SPName, DbParameter[] param)
        {
            return this.projectClassDAO.UpdateProjectClass(SPName, param);
        }
    }
}

